package com.sun.huazhi.aitaskservice.common.client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;

@Component
public class PythonImageApiClient {

    private final WebClient webClient;

    public PythonImageApiClient(
            @Value("${python.image-api.url}") String baseUrl,
            @Value("${python.image-api.key}") String apiKey) {
        this.webClient = WebClient.builder()
                .baseUrl(baseUrl)
                .defaultHeader("X-API-Key", apiKey)
                .build();
    }
}
